package com.th.supcom.pds.impl.common;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.th.supcom.framework.commoms.uitls.FcDateTimeUtil;
import com.th.supcom.pds.domain.pojo.InPatientInfo;

public final class InBillMockDataFactory
{
    private InBillMockDataFactory ()
    {
    }

    /** 模拟患者住院信息 */
    @SuppressWarnings ("deprecation")
    public static InPatientInfo getInPatientInfo (Long pid)
    {

        Map <Long, InPatientInfo> map = new HashMap <Long, InPatientInfo> ();

        InPatientInfo inPatientInfo = new InPatientInfo ();
        inPatientInfo.setBedId (16535L);
        inPatientInfo.setBedNo ("888");
        inPatientInfo.setChargeTypeCode ("P");// TODO 需要公共组提供字典
        inPatientInfo.setChargeTypeName ("医疗保险");
        inPatientInfo.setDeptAdmissionCode ("201006523");
        Date date = new Date ();
        date.setDate (new Date ().getDate () - 100);
        inPatientInfo.setDeptAdmissionDate (date);
        inPatientInfo.setDeptAdmissionDays ((int) FcDateTimeUtil.getIntervalDays (date, new Date ()));
        inPatientInfo.setDeptAdmissionName ("ICU（2号楼：");
        Date regDate = new Date ();
        regDate.setDate (new Date ().getDate () - 108);
        inPatientInfo.setInRegisterDate (regDate);
        inPatientInfo.setPatientId ("2000000854");
        inPatientInfo.setPatientName ("徐帮学");
        inPatientInfo.setSettledIndicator ("1");
        inPatientInfo.setSex ("男");
        inPatientInfo.setVisisId (1L);
        inPatientInfo.setPaiVisitId (3150L);
        map.put (inPatientInfo.getPaiVisitId (), inPatientInfo);

        InPatientInfo inPatientInfo2 = new InPatientInfo ();
        inPatientInfo2.setBedId (11525L);
        inPatientInfo2.setBedNo ("777");
        inPatientInfo2.setChargeTypeCode ("M");// TODO 需要公共组提供字典
        inPatientInfo2.setChargeTypeName ("合作医疗");
        inPatientInfo2.setDeptAdmissionCode ("201006523");
        Date date1 = new Date ();
        date1.setDate (new Date ().getDate () - 180);
        inPatientInfo2.setDeptAdmissionDate (date1);
        inPatientInfo2.setDeptAdmissionDays ((int) FcDateTimeUtil.getIntervalDays (date1, new Date ()));
        inPatientInfo2.setDeptAdmissionName ("肿瘤科（2号楼：");
        Date regDate1 = new Date ();
        regDate1.setDate (new Date ().getDate () - 190);
        inPatientInfo2.setInRegisterDate (regDate1);
        inPatientInfo2.setPatientId ("2000000254");
        inPatientInfo2.setPatientName ("刘强东");
        inPatientInfo2.setSettledIndicator ("1");
        inPatientInfo2.setSex ("男");
        inPatientInfo2.setVisisId (2L);
        inPatientInfo2.setPaiVisitId (3155L);
        map.put (inPatientInfo2.getPaiVisitId (), inPatientInfo2);

        InPatientInfo inPatientInfo3 = new InPatientInfo ();
        inPatientInfo3.setBedId (11255L);
        inPatientInfo3.setBedNo ("666");
        inPatientInfo3.setChargeTypeCode ("20115256");// TODO 需要公共组提供字典
        inPatientInfo3.setChargeTypeName ("O");
        inPatientInfo3.setDeptAdmissionCode ("201006523");
        Date date2 = new Date ();
        date2.setDate (new Date ().getDate () - 60);
        inPatientInfo3.setDeptAdmissionDate (date2);
        inPatientInfo3.setDeptAdmissionDays ((int) FcDateTimeUtil.getIntervalDays (date2, new Date ()));
        inPatientInfo3.setDeptAdmissionName ("心血管（2号楼：");
        Date regDate2 = new Date ();
        regDate2.setDate (new Date ().getDate () - 65);
        inPatientInfo3.setInRegisterDate (regDate2);
        inPatientInfo3.setPatientId ("2000000356");
        inPatientInfo3.setPaiVisitId (55555555L);
        inPatientInfo3.setPatientName ("李燕");
        inPatientInfo3.setSettledIndicator ("1");
        inPatientInfo3.setSex ("女");
        inPatientInfo3.setVisisId (3235L);
        map.put (inPatientInfo3.getPaiVisitId (), inPatientInfo3);

        if (map.containsKey (pid))
        {
            return map.get (pid);
        }
        return null;

    }

    /** 银联交易流水模拟数据 */
    // public static UnionpayUnilateralInfo getUnionpayUnilateralInfo (String
    // sysNo)
    // {
    //
    // Map <String, UnionpayUnilateralInfo> map = new HashMap <String,
    // UnionpayUnilateralInfo> ();
    //
    // UnionpayUnilateralInfo unionpayUnilateralInfo = new
    // UnionpayUnilateralInfo ();
    // unionpayUnilateralInfo.setBankNo ("4563517308302072456");
    // unionpayUnilateralInfo.setSysNo ("666666");
    // unionpayUnilateralInfo.setTerminalNo ("02135423");
    // unionpayUnilateralInfo.setTransactionDate ("0825");
    // unionpayUnilateralInfo.setTransactionTime ("103556");
    // unionpayUnilateralInfo.setAmount (10000d);
    // map.put (unionpayUnilateralInfo.getSysNo (), unionpayUnilateralInfo);
    //
    // UnionpayUnilateralInfo unionpayUnilateralInfo2 = new
    // UnionpayUnilateralInfo ();
    // unionpayUnilateralInfo2.setBankNo ("4563517308302014456");
    // unionpayUnilateralInfo2.setSysNo ("555555");
    // unionpayUnilateralInfo2.setTerminalNo ("02135125");
    // unionpayUnilateralInfo2.setAmount (50000d);
    // unionpayUnilateralInfo2.setTransactionDate ("0825");
    // unionpayUnilateralInfo2.setTransactionTime ("163556");
    // map.put (unionpayUnilateralInfo2.getSysNo (), unionpayUnilateralInfo2);
    //
    // UnionpayUnilateralInfo unionpayUnilateralInfo3 = new
    // UnionpayUnilateralInfo ();
    // unionpayUnilateralInfo3.setBankNo ("4563517308302014789");
    // unionpayUnilateralInfo3.setSysNo ("444444");
    // unionpayUnilateralInfo3.setTerminalNo ("02135562");
    // unionpayUnilateralInfo3.setAmount (80000d);
    // unionpayUnilateralInfo3.setTransactionDate ("0826");
    // unionpayUnilateralInfo3.setTransactionTime ("183556");
    // map.put (unionpayUnilateralInfo3.getSysNo (), unionpayUnilateralInfo3);
    // if (map.containsKey (sysNo))
    // {
    // return map.get (sysNo);
    // }
    // return null;
    // }

    /** 公司版权信息. */
    public static final String copyright = "Copyright 2014, TH Supcom Corporation";

    /** 提交路径. */
    public static final String SCC_BRANCH = "$URL$";

    /** 提交日期. */
    public static final String SCC_LAST_MODIFICATION_DATE = "$Date$";

    /** 最终修改人员. */
    public static final String SCC_LAST_MODIFIER_NAME = "$Author$";

    /** 最终版本号. */
    public static final String SCC_REVISION = "$Revision$";
}
